<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style type="text/css">
      * {
        margin: 0;
        padding: 0;
      }
      .nav {
        margin: 100px;
      }
      .nav li {
        float: left;
        width: 120px;
        height: 35px;
        margin: 0 10px;
        list-style: none;
        perspective: 300px;
      }
      .nav .box {
        position: relative;
        width: 100%;
        height: 100%;
        transition: all 0.2s linear;
        transform-style: preserve-3d;
      }
      .front,
      .bottom {
        position: absolute;
        top: 0;
        left: 0;
        width: 120px;
        height: 35px;
        line-height: 35px;
        font-size: 25px;
        text-align: center;
        color: #fff;
        cursor: pointer;
      }
      .front {
        z-index: 1;
        background-color: pink;
        transform: translateZ(17.5px);
      }
      .bottom {
        background-color: purple;
        /* 一定要先写位移
          【当我们同时有位移和其它属性的时候，应该先将位移放在最前面】
          顺序不对会影响转换的效果
          */
        transform: translateY(17.5px) rotateX(-90deg);
      }
      .box:hover {
        transform: rotateX(90deg);
      }
    </style>
  </head>
  <body>
    <ul class="nav">
      <li>
        <div class="box">
          <div class="front">番剧</div>
          <div class="bottom">哔哩哔哩</div>
        </div>
      </li>
      <li>
        <div class="box">
          <div class="front">游戏中心</div>
          <div class="bottom">哔哩哔哩</div>
        </div>
      </li>
      <li>
        <div class="box">
          <div class="front">直播</div>
          <div class="bottom">哔哩哔哩</div>
        </div>
      </li>
      <li>
        <div class="box">
          <div class="front">会员购</div>
          <div class="bottom">哔哩哔哩</div>
        </div>
      </li>
      <li>
        <div class="box">
          <div class="front">漫画</div>
          <div class="bottom">哔哩哔哩</div>
        </div>
      </li>
      <li>
        <div class="box">
          <div class="front">会员购</div>
          <div class="bottom">赛事</div>
        </div>
      </li>
    </ul>
  </body>
</html>
